package com.noah2021.service.solo.impl;

import com.noah2021.entity.bo.HeadLine;
import com.noah2021.entity.dto.Result;
import com.noah2021.service.solo.HeadLineService;
import lombok.extern.slf4j.Slf4j;
import org.simpleframework.core.annotation.Service;

import java.util.ArrayList;
import java.util.List;
/**
 * 〈〉
 *
 * @author Noah2021
 * @create 2021/3/6
 * @return
 */
@Service
public class HeadLineServiceImpl implements HeadLineService {

    @Override
    public Result<Boolean> addHeadLine(HeadLine headLine) {
        System.out.println("【INFO】addHeadLine被执行啦, lineName["+headLine.getLineName()+
                "],lineLink["+headLine.getLineLink()+"],lineImg["+headLine.getLineImg()+"], priority["+headLine.getPriority()+"]");
        Result<Boolean> result = new Result<Boolean>();
        result.setCode(200);
        result.setMsg("请求成功啦");
        result.setData(true);
        return result;
    }

    @Override
    public Result<Boolean> removeHeadLine(int headLineId) {
        return null;
    }

    @Override
    public Result<Boolean> modifyHeadLine(HeadLine headLine) {
        return null;
    }

    @Override
    public Result<HeadLine> queryHeadLineById(int headLineId) {
        HeadLine headLine = new HeadLine();
        headLine.setLineLink("12345");
        headLine.setLineName("广告");
        Result<HeadLine> result = new Result<HeadLine>();
        result.setCode(200);
        result.setMsg("请求成功啦");
        result.setData(headLine);
        return result;
    }

    @Override
    public Result<List<HeadLine>> queryHeadLine(HeadLine headLineCondition, int pageIndex, int pageSize) {
        return null;
    }
}
